#!/bin/bash

portPid=$(netstat -anp | grep "7878" | awk '{printf $7}' | cut -d/ -f1)
if [ -n "$portPid" ]; then
  echo "kill ipo-SNAPSHOT.jar port  7089"
  kill -9 "$portPid"
  echo 'kill ipo-SNAPSHOT.jar  pid:' "$portPid"
fi

sleep 1s

echo "start iipo  -------"

nohup java  -Xms2000m -Xmx2000m -jar iipo-SNAPSHOT.jar >/dev/null 2>&1 &
